﻿@model AppSummary
@{
    ViewData["Title"] = "Home Page";
}

<div class="text-center">
    <h1>Example4 - hierarchical multi-tenant</h1>
</div>
<h4>Application summary</h4>
<ul>
    <li><strong>@nameof(AppSummary.Application)</strong>:&nbsp;@Model.Application</li>
    <li><strong>@nameof(AppSummary.AuthorizationProvider)</strong>:&nbsp;@Model.AuthorizationProvider</li>
    <li><strong>@nameof(AppSummary.CookieOrToken)</strong>:&nbsp;@Model.CookieOrToken</li>
    <li><strong>@nameof(AppSummary.MultiTenant)</strong>:&nbsp;@Model.MultiTenant</li>
    <li>
        <strong>@nameof(AppSummary.Databases)</strong>:&nbsp;
        <ul>
            @foreach (var database in Model.Databases)
            {
                <li>@database</li>
            }
        </ul>
    </li>
    @if (@Model.Note != null)
    {
        <li><strong>@nameof(AppSummary.Note)</strong>:&nbsp;@Model.Note</li>
    }
</ul>

<h2>How to use use this application</h2>
<p>
    <ol>
        <li>
            Log in using one of the demo users <a asp-area="" asp-controller="AuthUsers" asp-action="Index">found here</a>.
            NOTE: The email is also the password.
            <ul>
                <li>Pick a user that has a <strong>SaleManager</strong> (good choice!) or SalesAssistant role if you want to sell something. </li>
                <li>Pick a user that has a AreaManger if you want to see data for all shops. </li>
            </ul>
        </li>
        <li>
            Once you have logged in then a menu should have a "Shop" dropdown - pick one of the following.
            <ul>
                <li><strong>Till</strong> to sell something (not present if AreaManager).</li>
                <li><strong>Stock</strong> to see what stock the shop has.</li>
                <li><strong>Sales</strong> to see what sales the shop has done (not present if SalesAssistant).</li>
            </ul>
        </li>
        <li>When log in you can see your claims, permissions and other user/role info via the "User Admin" menu button.</li>
        <li>
            Go to the <a asp-area="" asp-controller="AuthUsers" asp-action="Index">User Admin -> List all users</a> to see the users.
            This would normally be only available to admin users, but for this demo anyone can see it.
            <i>NOTE: if you log in as an 'admin' user, or Super@g1.com to have full admin rights.</i>
        </li>
    </ol>
</p>

